#读取json文件
import json
from config import DIR_PATH
import os


def read_json(filename,key):
    #拼写完整的路径 os.sep动态获取/ \
    file_path = DIR_PATH + os.sep + "data" + os.sep + filename
    arr = []
    #[(),()]
    with open(file_path, "r", encoding="utf-8") as f:
       for data in json.load(f).get(key):
         arr.append(tuple(data.values())[1:])
    return arr


if __name__ == '__main__':
    read_json("create_shortlink.json","create_shortlink_test_cases")
